boxing and unboxing in c#

82

boxing and unboxing in c# -

class BoxingUnboxing
{  
    static void Main()  
    {  
        int myVal = 1;  
        object obj = myVal; // Boxing  
        int newVal = (int)obj; // Unboxing  
    }  
}  

Comments

Submit
0 Comments